/**
 * Created by qtbui on 2017/9/20.
 */
class Solution {
    public int strStr(String haystack, String needle)
    {
        if(needle==null || needle.isEmpty())
        {
            return 0;
        }
        if(haystack==null)
        {
            return -1;
        }
        return haystack.indexOf(needle);
    }
}

public class test
{
    public static void main(String[] args)
    {
        int n = new Solution().strStr("0","a");
        System.out.println(n);
    }
}
